package com.benjaminwan.read.free.utils

import androidx.navigation.fragment.NavHostFragment

inline fun <reified T> getFragment(navHostFragment: NavHostFragment): T? {
    return navHostFragment.childFragmentManager.fragments.firstOrNull {
        it is T
    } as T?
}